/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

:host {
  $arrow-size: 6px;

  z-index: 10000;

  .content {
    display: flex;
    align-items: center;
  }

  &.right .content {
    flex-direction: row-reverse;
  }

  .arrow {
    position: absolute;

    width: 0;
    height: 0;
  }

  nb-icon {
    font-size: 1.1em;
    min-width: 1em;
  }

  nb-icon + span {
    margin-left: 0.5rem;
  }
  &.right nb-icon + span {
    margin-right: 0.5rem;
  }

  .arrow {
    border-left: $arrow-size solid transparent;
    border-right: $arrow-size solid transparent;
  }

  &.bottom .arrow {
    top: -#{$arrow-size};
    left: calc(50% - #{$arrow-size});
  }

  &.left .arrow {
    right: round(-$arrow-size - $arrow-size / 2.5);
    top: calc(50% - #{$arrow-size / 2.5});
    transform: rotate(90deg);
  }

  &.top .arrow {
    bottom: -#{$arrow-size};
    left: calc(50% - #{$arrow-size});
    transform: rotate(180deg);
  }

  &.right .arrow {
    left: round(-$arrow-size - $arrow-size / 2.5);
    top: calc(50% - #{$arrow-size / 2.5});
    transform: rotate(270deg);
  }
}
